{% extends "base.html" %}

{% block title %}
	{% if isHome %}
		首页 | Adoryn Blog
	{% endif %}

	{% if isArchMonth %}
		归档 | {{ year }}年 | {{ month }}月 | Adoryn Blog
	{% endif %}

	{% if isClass %}
		分类 | {{ cls }} | Adoryn Blog
	{% endif %}

	{% if isTag %}
		标签 | {{ tag }} | Adoryn Blog
	{% endif %}

	{% if isSearch %}
		搜索 | {{searchContent}} | Adoryn Blog
	{% endif %}
{% endblock %}


{% block path %}
	{% if isHome %}
		<a href="{% url 'home'%}" titile="返回首页" class="icon-home icon-large"></a>&nbsp;/&nbsp;
	{% endif %}

	{% if isArchMonth %}
		<a href="{% url 'home'%}" titile="返回首页" class="icon-home icon-large"></a>&nbsp;/&nbsp;归档：{{year}}年{{month}}月
	{% endif%}

	{% if isClass %}
		<a href="{% url 'home'%}" titile="返回首页" class="icon-home icon-large"></a>&nbsp;/&nbsp;分类：{{cls}}
	{% endif%}
	
	{% if isTag %}
		<a href="{% url 'home'%}" titile="返回首页" class="icon-home icon-large"></a>&nbsp;/&nbsp;标签：{{tag}}
	{% endif%}

	{% if isSearch %}
		<a href="{% url 'home'%}" titile="返回首页" class="icon-home icon-large"></a>&nbsp;/&nbsp;搜索：{{searchContent}}
	{% endif%}
{% endblock %}

{% block content %}
	{% if error %}
		<h2>没有相关文章</h2>
	{% else %}
		{% for article in articles %}
			<div class="archive">
				<div id="archives">
					<header class="entry-header">
						<div class="entry-info">
							<span class="entry-date">
								<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span>
								{{article.publish_time.year}}年{{article.publish_time.month}}月{{article.publish_time.day}}日
							</span>
							<span class="author vcard">
								<span class="glyphicon glyphicon-user" aria-hidden="true"></span>
								赵俊龙Adoryn
							</span>
						</div>

						<h1 class="entry-title">
							<a href="{{ article.get_absolute_url }}" rel="bookmark">{{ article.title }}</a>
						</h1>

						<div class="post-format-indicator">
							<a class="entry-format" href="{{ article.get_absolute_url }}"></a>
						</div>
					</header>

					<div class="entry-content">
						<p class="MsoNormal">
							{{ article.content|truncatewords_html:40|safe }}
						</p>
						<div class="clearfix"></div>
					</div> <!-- entry content -->

					<footer class="entry-meta">
						<span class="entry-categories">
							<span class="glyphicon glyphicon-folder-close" aria-hidden="true"></span>
							<a href="{% url 'classDetail' cls=article.classification %}" rel="category">&nbsp;{{ article.classification }}</a>
						</span>

						<span class="entry-tags">
							<span class="glyphicon glyphicon-tags" aria-hidden="true"></span>
							{% for tag in article.get_tags %}
								<a href="{{ tag.get_absolute_url }}" rel="tag">&nbsp;{{ tag }}&nbsp;</a>
							{% endfor %}
						</span>

						<a href="{{ article.get_absolute_url }}" class="more-link"><span class="glyphicon glyphicon-link" aria-hidden="true"></span>阅读全文</a>
					</footer>
				</div>
			</div>
		{% endfor %}
	{% endif %}

	{% include "blog/_paginator.html" %}
{% endblock %}

{% block side %}
	{% include "blog/_side.html" %}
{% endblock %}
